package com.xcf.service.business.common.shipowner.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.xcf.dao.DaoSupport;
import com.xcf.entity.Page;
import com.xcf.service.business.common.shipowner.ShipOwnerService;
import com.xcf.util.PageData;
@Service("ShipOwnerServiceImpl")
public class ShipOwnerServiceImpl implements ShipOwnerService {
	@Resource(name="daoSupport")
	private DaoSupport daoSupport;

	@Override
	public List<PageData> seach(Page pd) throws Exception {
		
		return (List<PageData>) daoSupport.findForList("shipownernmapper.seach", pd);
	}

	//点击添加保存一条
	@Override
	public void addship(PageData pd) {
		try {
			daoSupport.save("shipownernmapper.addship", pd);
		} catch (Exception e) {
		
			e.printStackTrace();
		}
		
	}

	//去修改页面
	@Override
	public PageData seacById(PageData pd) throws Exception {
		
		return (PageData) daoSupport.findForObject("shipownernmapper.seacById", pd);
	}

	//修改
	@Override
	public void updateship(PageData pd) {
		try {
			daoSupport.update("shipownernmapper.updateship", pd);
		} catch (Exception e) {
			
			e.printStackTrace();
		}
		
	}

	//删除
	@Override
	public void delete(PageData pd) {
		try {
			daoSupport.delete("shipownernmapper.deleteU", pd);
		} catch (Exception e) {
			
			e.printStackTrace();
		}
		
	}

	
}
